<?php
Util::tsRegisterAssetJs('checkboxGrupo.js');
/** @var GrupoController $this */
/** @var Grupo $model */
?><?php
$form = $this->beginWidget('CActiveForm', array(
    'id' => 'clientesgroup',
        ));
?>

<div class="widget blue">
    <div class="widget-title">
        <h4><i class="icon-list"></i> <?php echo $modelG->nombre ?></h4>
        <span class="tools">
            <a href="javascript:;" class="icon-chevron-down"></a>
            <!--a href="javascript:;" class="icon-remove"></a-->
        </span>
    </div>
    <div class="widget-body">
        <?php
        $this->widget('bootstrap.widgets.TbGridView', array(
            'id' => 'grupo-grid',
            'type' => 'striped bordered hover advance',
            'dataProvider' => $model->searchByIdCuenta($ids),
//            'filter' => $model,
            'columns' => array(
                array(
                    'name' => 'rating',
                    'type' => 'raw',
                    'value' => '$this->grid->controller->widget("CStarRating", array (
                        "name" => $data->id,
                        "id" => "rating_".$data->id,
                        "value" => $data->rating,
                        "allowEmpty" => false,
                        "maxRating" => 5,
                        "htmlOptions" => array("class"=>"star-rating"),
                        "callback"=>"js:function(){
                            rating($data->id);
                        }"
                    ), true)',
                    'headerHtmlOptions' => array('style' => 'width:85px;'),
                    'filter' => false,
                    'sortable' => true,
                ),
                array(
                    'name' => 'nombre',
                    'value' => 'CHtml::link($data->nombre, Yii::app()->createUrl("/crm/cuenta/update",array("id"=>$data->id)))',
                    'type' => 'raw',
                ),
                array(
                    'header' => 'Teléfono',
                    'value' => '$data->telefonoPrincipal?$data->telefonoPrincipal:"<label class=\"text-info\">no registrado</label>"',
                    'type' => 'raw',
                ),
                'website',
            ),
        ));
        ?>
    </div>
</div>
<?php $this->endWidget(); ?>
<form name='formulariollamada' id='fllamada' class='hidden'>
    <input type="hidden" name="cliente_id" id='cliente_llamda'><br>
</form>